NET design Specifications: conventions, idioms and patterns ——— naming conventions Foreword: Recently in the ". NET design Specifications: conventions, idioms and patterns of the book, mainly speaking. NET design specifications, before this piece is
C # Coding specifications summarized by myself-1. Naming Conventions,
Recently, I have compiled c # coding standards for my company. I haven't studied much about this in the past. I just thought that the code can make my own sense.
I have referred
Chapter 2 naming rules of. NET specification and. net Specification. NET specification Chapter 1 naming convention
3.1 case sensitivity
PascalCasing should be used for the namespace, type, and member name composed of multiple words.
Use camelCasing
C # getting started with zero infrastructure 08: code specifications,
I. Preface
No rules. This is especially true in the world of code. As a programmer, we don't want our code to be laughed at after it is written: Look, even a line feed is not so
Always want to write a code of their own standards, after a period of excellent open source code observation and look at other people write standards, feel good code to people feel is comfortable, also very important. So put them in summary, for
. Net naming rules and. net specifications
The naming rules are used to make the framework elements easy to understand and maintain consistency.
Case sensitivity
Case-sensitive rules for identifiers: To distinguish multiple words in the
A: Preface No rules, inadequate surrounding area. This is especially true in the world of code. As programmers, we don't want our code to be laughed at later: Look, even a change of line is so unprofessional. As a development manager, we don't want
I. general conventions
1. Use of curly braces
YesPlace the left curly braces at the end of the previous statement.If (someexpression ){Dosomething ();}
YesAlign the right curly braces with the beginning of the row where the left curly
After several years of experience, several companies have also participated in the design and development of some project products. I dare not say anything about it. I can only say that there has been some technical accumulation. I want to write it
I always thought that I was still talking about programming skills. Yesterday, a teacher saw what I wrote before.
Code I still need to strengthen my skills (I was very depressed at the time, but I actually know more than him ). In many cases, we
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.